package com.cn.dim.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.cn.dim.dao.ProptypeDao;
import com.cn.dim.pojo.Proptype;
import com.cn.dim.service.ProptypeService;
import com.github.pagehelper.PageHelper;
@Service("proptypeService")
public class ProptypeServiceImpl implements ProptypeService{
	@Resource
	ProptypeDao proptypeDao;

	@Override
	public List<Map<String, Object>> queryProptype(Map<String, Object> m) {
		// TODO Auto-generated method stub
		PageHelper.startPage(Integer.valueOf(m.get("pageIndex").toString()),Integer.valueOf(m.get("pageSize").toString()),true);
		return proptypeDao.queryProptype(m);
	}

	@Override
	public int insertProptype(Proptype p) {
		// TODO Auto-generated method stub
		return proptypeDao.insertProptype(p);
	}

	@Override
	public int updateProptype(Proptype p) {
		// TODO Auto-generated method stub
		return proptypeDao.updateProptype(p);
	}

	@Override
	public int delProptype(Map<String, Object> m) {
		// TODO Auto-generated method stub
		proptypeDao.delProptype(m);
		return proptypeDao.delProp(m);
	}

	@Override
	public Proptype queryProptypeById(Map<String, Object> m) {
		// TODO Auto-generated method stub
		return proptypeDao.queryProptypeById(m);
	}

	@Override
	public List<Map<String, Object>> getProptypeInWx(Map<String, Object> m) {
		// TODO Auto-generated method stub
		return proptypeDao.getProptypeInWx(m);
	}
}
